import { createBrowserRouter, Navigate } from "react-router-dom";
import App from "../App"
import Login from "../component/Login/Home"
import HomePage from "../component/Homepage/Home"
import Image from '../component/Homepage/Image'//图文问诊
import Tel from '../component/Homepage/Tel'//电话问诊
import Video from '../component/Homepage/Video'//图文问诊
import Hall from '../component/Homepage/Hall'//抢单大厅
import Details from '../component/Homepage/Details'//接诊详情页
import MessageDetails from "../component/Homepage/MessageDetails";//消息详情页
import FollowUp from "../component/Homepage/FollowUp";//复诊开药
import FollowUpDetails from "../component/Homepage/FollowUpDetails";//复诊开药详情页
import Serve from "../component/Serve/Home"
// import Mine from "../component/Mine/Home"
//周佳丽--我的
import Mine from "../component/NewMine/Home"
import MinPage from "../component/NewMine/MinPage"
import Setup from "../component/NewMine/Setup"
import Fans from '../component/NewMine/Fans'
import Evaluate from "../component/NewMine/Evaluate"
import Order_details from '../component/NewMine/Order_details'
import Mima from '../component/NewMine/Mima'
import Phone from '../component/NewMine/Phone'
import Bark_card from "../component/NewMine/Bark_card"
import Barks from '../component/NewMine/Barks'
import Income from '../component/NewMine/Income'
import Order_page from '../component/NewMine/Order_page'
import Ysrz from "../component/Ysrz/Home"
// 黄朝阳---医师认证
import Page1 from "../component/Ysrz/Page1"
import Page2 from "../component/Ysrz/Page2"
import Ceck1 from "../component/Ysrz/Ceck1"
import Ceck2 from "../component/Ysrz/Ceck2"
import Ceck3 from "../component/Ysrz/Ceck3"
import Ceck4 from "../component/Ysrz/Ceck4"
import Ceck5 from "../component/Ysrz/Ceck5"
//黄朝阳--服务
import ShowServe from "../component/Serve/ShowServe";
import MinServe from "../component/Serve/NewHome"
// 黄朝阳--挂号预约
import Ghyy from "../component/Ghyy/Home"
import Gpage1 from "../component/Ghyy/Page1"
//黄朝阳---患者管理
import Hzgl from "../component/Hzgl/Home"
import HPage1 from "../component/Hzgl/HPage1"
import HPage2 from "../component/Hzgl/Hpage2"
import HzCeck1 from "../component/Hzgl/HzCeck1"
import HzCeck2 from "../component/Hzgl/HzCeck2"
import HzCeck3 from "../component/Hzgl/HzCeck3"
import HzXiaoxi from "../component/Hzgl/HzXiaoxi"
import AddXiao from "../component/Hzgl/AddXiao"

import Recipe from "../component/Mine/Recipe";
import Detail from "../component/Mine/Detail";
import Servset from "../component/Mine/Servset";
import Price from "../component/Mine/Price";
import Time from "../component/Mine/Time";
import Number from "../component/Mine/Number";
import Feedback from "../component/Mine/Feedback";


// import Mine from "../component/Mine/Home"
import Ks from '../component/Homepage/su/Ks'
import Hist from '../component/Homepage/su/Hist'
import Diy from '../component/Homepage/su/Diy'
import EditDiy from "../component/Homepage/su/EditDiy";
import Addy from "../component/Homepage/su/Addy";
import Ytype from "../component/Homepage/su/Ytype";
import Self from "../component/Homepage/su/Self";
import Gg from "../component/Homepage/su/Gg";
import Uf from "../component/Homepage/su/Uf";
import Continue from "../component/Homepage/su/Continue";
import Newcf from "../component/Homepage/su/Newcf";
let router = createBrowserRouter([
    {
        path: "/",
        element: <App></App>,
        children: [
            {
                path: "/home",
                element: <HomePage></HomePage>,
            }, {
                path: "/serve",
                element: <Serve></Serve>
            }, {
                path: "/mine",
                element: <Mine></Mine>
            }, {
                path: "/",
                element: <Navigate to="/login" />
            },
        ]
    }, {
        path: "/ysrz",
        element: <Ysrz></Ysrz>,
        children: [
            {
                path: "/ysrz/page1",
                element: <Page1></Page1>
            }, {
                path: "/ysrz/page2",
                element: <Page2></Page2>
            }, {
                path: "/ysrz/ceck1",
                element: <Ceck1></Ceck1>
            }, {
                path: "/ysrz/ceck2",
                element: <Ceck2></Ceck2>
            }, {
                path: "/ysrz/ceck3",
                element: <Ceck3></Ceck3>
            }, {
                path: "/ysrz/ceck4",
                element: <Ceck4></Ceck4>
            }, {
                path: "/ysrz/ceck5",
                element: <Ceck5></Ceck5>
            }, {
                path: "/ysrz",
                element: <Navigate to="/ysrz/page1" />
            }
        ]
    }, {
        path: '/image',
        element: <Image />
    },
    {
        path: '/tel',
        element: <Tel />
    },
    {
        path: '/video',
        element: <Video />
    },
    {
        path: '/hall',
        element: <Hall />
    },
    {
        path: '/details/:id',
        element: <Details />
    },
    {
        path: '/messagedetails/:id',
        element: < MessageDetails />

    }, {
        path: "/MinPage",
        element: <MinPage></MinPage>,
        children: [
            {
                path: "/MinPage/Setup",
                element: <Setup></Setup>
            },
            {
                path: "/MinPage",
                element: <Navigate to="/MinPage" />
            },
            {
                path: '/MinPage/Bark_card',
                element: <Bark_card></Bark_card>
            },
            {
                path: '/MinPage/Barks',
                element: <Barks></Barks>
            },
            {
                path: '/MinPage/Fans',
                element: <Fans></Fans>
            },
            {
                path: '/MinPage/Evaluate',
                element: <Evaluate></Evaluate>
            }, {
                path: '/MinPage/Mima',
                element: <Mima></Mima>
            },
            {
                path: '/MinPage/Phone',
                element: <Phone></Phone>
            },
            {
                path: '/MinPage/Bark_card',
                element: <Bark_card></Bark_card>
            },
            {
                path: '/MinPage/Income',
                element: <Income></Income>
            },
            {
                path: "/MinPage/Order_details",
                element: <Order_details></Order_details>
            },
            {
                path: '/MinPage/Order_page',
                element: <Order_page></Order_page>
            }
        ]
    }, {
        path: '/followup',
        element: <FollowUp />
    },
    {
        path: '/followupdetails/:id',
        element: <FollowUpDetails />
    },
    {
        path: "/MaxServe",
        element: <MinServe></MinServe>,
        children: [
            {
                path: "/MaxServe/ShowServe",
                element: <ShowServe></ShowServe>
            }, {
                path: "/MaxServe",
                element: <Navigate to="/MaxServe/ShowServe" />
            }
        ]
    },
    {
        path: "/Ghyy",
        element: <Ghyy></Ghyy>,
        children: [
            {
                path: "/Ghyy/Page1",
                element: <Gpage1></Gpage1>
            }, {
                path: "/Ghyy",
                element: <Navigate to="/Ghyy/Page1" />
            }
        ]
    },
    {
        path: "/Hzgl",
        element: <Hzgl></Hzgl>,
        children: [
            {
                path: "/Hzgl/HPage1",
                element: <HPage1></HPage1>
            }, {
                path: "/Hzgl/HPage2",
                element: <HPage2></HPage2>
            }, {
                path: "/Hzgl/HzCeck1",
                element: <HzCeck1></HzCeck1>
            }, {
                path: "/Hzgl/HzCeck2",
                element: <HzCeck2></HzCeck2>
            }, {
                path: "/Hzgl/HzCeck3",
                element: <HzCeck3></HzCeck3>
            }, {
                path: "/Hzgl/HzXiaoxi",
                element: <HzXiaoxi></HzXiaoxi>
            }, {
                path: "/Hzgl/AddXiao",
                element: <AddXiao></AddXiao>
            },
            {
                path: "/Hzgl",
                element: <Navigate to="/Hzgl/HPage1" />
            }
        ]
    },
    {
        path: "/feedback",
        element: <Feedback></Feedback>
    },
    {
        path: "/servset",
        element: <Servset></Servset>
    },
    {
        path: "/number",
        element: <Number></Number>
    },
    {
        path: "/time",
        element: <Time></Time>
    },
    {
        path: "/price",
        element: <Price></Price>
    },
    {
        path: "/recipe",
        element: <Recipe></Recipe>
    },
    {
        path: "/detail",
        element: <Detail></Detail>
    },
    {
        path: '/gg',
        element: <Gg></Gg>,
        children: [
            {
                path: "/gg",
                element: <Navigate to="/gg/ks" />
            },
            {
                path: '/gg/self',
                element: <Self></Self>
            },
            {
                path: '/gg/ytype',
                element: <Ytype></Ytype>
            },
            {
                path: '/gg/diy',
                element: <Diy></Diy>
            },
            {
                path: '/gg/editdiy',
                element: <EditDiy></EditDiy>
            },
            {
                path: '/gg/addy',
                element: <Addy></Addy>
            },

            {
                path: '/gg/ks',
                element: <Ks></Ks>
            },
            {
                path: '/gg/hist',
                element: <Hist></Hist>
            },
            {
                path: '/gg/uf',
                element: <Uf></Uf>
            },
            {
                path: '/gg/continue',
                element: <Continue></Continue>
            },
            {
                path: '/gg/newcf',
                element: <Newcf></Newcf>
            }
        ]
    }, {
        path: "/login",
        element: <Login></Login>
    }, {
        path: "*",
        element: <Navigate to="/Login" />
    }

])

export default router